﻿<Window x:Class="ExploreRoutedEvents.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Explore Routed Events" Height="350" Width="525">

    <Grid Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel x:Name="panel" MouseDown="StackPanel_MouseDown">
            <Border BorderThickness="10" BorderBrush="Blue" Width="155" x:Name="border"
            Margin="20" MouseDown="Border_MouseDown">
                <Grid x:Name="grid" MouseDown="Grid_MouseDown">
                    <Ellipse Fill="Red"  Width="100" Height="100" 
                    MouseDown="Ellipse_MouseDown"/>
                    <Rectangle Fill="Gray" Width="50" Height="50"
                    MouseDown="Rectangle_MouseDown" x:Name="grayRectangle"/>
                </Grid>
            </Border>
            <ListBox BorderThickness="1" Width="250" Height="140" x:Name="output" Margin="0,0,20,0"/>
        </StackPanel>
        <StackPanel Grid.Column="1">
            <CheckBox Content="Border sets handled" x:Name="borderSetsHandled"/>
            <CheckBox Content="Grid sets handled" x:Name="gridSetsHandled" />
            <CheckBox Content="Ellipse sets handled" x:Name="ellipseSetsHandled"/>
            <CheckBox Content="Rectangle sets handled" x:Name="rectangleSetsHandled"/>
            <Button Content="Update Rectangle IsHitTestVisible"
            Click="UpdateHitTestButton" Margin="0,20,20,0"/>
            <CheckBox IsChecked="True" Content="New IsHitTestVisible value"
            x:Name="newHitTestVisibleValue" />
        </StackPanel>
    </Grid>
</Window>
